package com.tupu.service.dispatch;

import com.tupu.common.PageResult;
import com.tupu.entity.dispatch.PlanText;
import com.tupu.entity.dispatch.WarningEventFailurePlan;
import com.tupu.entity.dto.WarningEventFailurePlanDto;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public interface PlanService {

    //删除一条
    void del(String planId);

    //下载模板
    void downloadWordTemplate(HttpServletResponse response);

    //导入word预案
    void importWord(MultipartFile file) throws Exception;

    //查询一条
    WarningEventFailurePlan findPlanByPlanId(Integer planId);

    //条件查询预案管理列表
    PageResult<WarningEventFailurePlanDto> conditionSearch(Integer pageNum, Integer pageSize, String planName, String device,String station,Integer category, Integer level);

    //根据预案模版下载
    void downloadWordByPlanId(Integer planId, HttpServletResponse response) throws IOException;

    //根据id编辑原有预案
    void updatePlanById(WarningEventFailurePlan plan);

    void insertPlan(WarningEventFailurePlan plan);

    //复制一条预案
    void copyPlanByPlanId(Integer planId);

    //预案中的文本替换
    boolean textReplace(PlanText text) throws IllegalAccessException;

    void testAddStation();
}
